GrapeCity.Win.Calendar 名前空間 > CalendarNoteCollection クラス > AddRange メソッド : AddRange(DateTime,CalendarNote[]) メソッド |
Public Overloads Sub AddRange( _ ByVal date As Date, _ ByVal notes() As CalendarNote _ )
public void AddRange( DateTime date, CalendarNote[] notes )
次のサンプルコードは、GcCalendar コントロールにメモを追加する方法を示します。
private void CreateCalendarWithNote() { // Create a GcCalendar. GcCalendar gcCalendar1 = new GcCalendar(); gcCalendar1.Size = new Size(500, 500); gcCalendar1.CalendarType = CalendarType.MonthDay; // Set the appearance and behavior for NoteArea. gcCalendar1.ShowNotes = true; gcCalendar1.AllowDragDropNote = true; gcCalendar1.NoteArea.NoteAreaAlignment = NoteAreaAlignment.Right; gcCalendar1.NoteArea.BackColor = Color.LightBlue; gcCalendar1.NoteArea.BorderStyle = BorderStyle.FixedSingle; gcCalendar1.NoteArea.SingleBorderColor = Color.DarkBlue; // Add 4 notes to today. gcCalendar1.Notes.Add(DateTime.Today, new CalendarNote("Note1", null, NoteDisplayMode.Text)); gcCalendar1.Notes.Add(DateTime.Today, new CalendarNote("Note2", null, NoteDisplayMode.Text)); gcCalendar1.Notes.Add(DateTime.Today, new CalendarNote("Note3", null, NoteDisplayMode.Text)); gcCalendar1.Notes.Add(DateTime.Today, new CalendarNote("Note4", null, NoteDisplayMode.Text)); this.Controls.Add(gcCalendar1); }
Private Sub CreateCalendarWithNote() ' Create a GcCalendar. Dim gcCalendar1 As New GcCalendar() gcCalendar1.Size = New Size(500, 500) gcCalendar1.CalendarType = CalendarType.MonthDay ' Set the appearance and behavior for NoteArea. gcCalendar1.ShowNotes = True gcCalendar1.AllowDragDropNote = True gcCalendar1.NoteArea.NoteAreaAlignment = NoteAreaAlignment.Right gcCalendar1.NoteArea.BackColor = Color.LightBlue gcCalendar1.NoteArea.BorderStyle = BorderStyle.FixedSingle gcCalendar1.NoteArea.SingleBorderColor = Color.DarkBlue ' Add 4 notes to today. gcCalendar1.Notes.Add(DateTime.Today, New CalendarNote("Note1", Nothing, NoteDisplayMode.Text)) gcCalendar1.Notes.Add(DateTime.Today, New CalendarNote("Note2", Nothing, NoteDisplayMode.Text)) gcCalendar1.Notes.Add(DateTime.Today, New CalendarNote("Note3", Nothing, NoteDisplayMode.Text)) gcCalendar1.Notes.Add(DateTime.Today, New CalendarNote("Note4", Nothing, NoteDisplayMode.Text)) Me.Controls.Add(gcCalendar1) End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2